<?php

namespace app\admin\validate;

use think\Validate;

class ServiceBasic extends Validate
{
    /**
     * 验证规则.
     */
    protected $rule = [
        'name'=>'max:50',
        'code'=>'max:30',
        'description'=>'max:100',
    ];
    /**
     * 提示消息.
     */
    protected $message = [
    ];
    /**
     * 验证场景.
     */
    protected $scene = [
        'add'  => ['name','code','description'],
        'edit' => ['name','code','description'],
    ];

    public function __construct()
    {
        $this->field = [
            'name' => '服务名',
            'code' => '服务代码',
            'description' => '简介',
        ];
        parent::__construct();
    }
}
